home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HPAVC
/
HPAVC CD-ROM.iso
/
MCASM.RAR
/
MC_ASM.EXE
/
WROX_ASM
/
CH12
/
COMMON
/
QUANT.H
< prev
next >
Wrap
C/C++ Source or Header
|
1994-09-09
|
1KB
|
40 lines
#ifndef QUANT_H
#define QUANT_H
#include <mem.h>
#include "common.h"
#include "graph.h"
#include "grfile.h"
#include "palette.h"
#include "mapper.h"
// auxiliar class that hides details of color quantization
/* RGB to 256 colors */
class color_reductor {
protected:
color_selector *selector;
color_mapper *mapper;
image_keeper *keeper;
BYTE *tmp_line; // is used for 256 to 16 colors converting
public:
BGRpalette my_colormap;
BOOL initialized, view_pass1, ready_for_pass2;
graph_file_reader *input_file;
// data type must be TRUECOLOR! or COLOR256
color_reductor (graph_file_reader *input_file_,
BOOL view_pass1_, int colors);
// if you set view = TRUE, do not forget set grafics in
// 256 colors mode!
virtual ~color_reductor(); // doesn't kills input_file
virtual int pass1(); // returns -1 if error
// after pass1() we're ready for pass2
void process_line(int line_n, BYTE *out_line);
// one line of pass2
};
void refresh(int i,BOOL pass2);
#endif